feat(cortex): MCP Streamable HTTP endpoint at /mcp (remote connector, Phase 1)#102
Merged
Conversation
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… JWT accept/reject) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ource Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…-https JWKS Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
Author
Phase 2 added: OAuth 2.0 Resource ServerThis PR now also includes Phase 2 — cortex acts as an OAuth Resource Server for What's new (feature
Verification: all four feature combos compile ( Out of scope: the Authorization Server (Keycloak), deployment, and secrets live in the private ops repo, not here. |
ApiliumDevTeam
added a commit
that referenced
this pull request
Jun 23, 2026
feat(cortex): MCP Streamable HTTP endpoint at /mcp (remote connector, Phase 1)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a remote MCP transport over HTTP so aingle's MCP server can be used as a remote connector by cloud clients (claude.ai, and — being MCP-standard — Codex/Cursor/etc.), not just locally over stdio.
AingleMcp(25 tools) +AppStateover Streamable HTTP at/mcp, mounted on cortex's existing axum server (rmcp 1.7StreamableHttpService). Same tools, sameservice::layer — only the transport is new./mcp(constant-time compare), with a deliberate safety gate: the route is only mounted when a token is configured (--mcp-http-token/AINGLE_MCP_HTTP_TOKEN) or--mcp-http-allow-anonymousis passed — never exposed unintentionally.AINGLE_PUBLIC_HOSTadds the deployment hostname(s) to rmcp'sallowed_hosts(default is loopback-only, anti DNS-rebinding).mcp-http(composes rmcptransport-streamable-http-server+server-side-http). Default build andmcp-without-mcp-httpare unaffected.Why
The classic stdio MCP server only works with local clients (Claude Desktop classic / Claude Code). Cloud clients use remote HTTP connectors. This is Phase 1 of the remote connector.
Test plan
cargo test -p aingle_cortex --features "mcp-http dag"— 188 lib + integration; 0 failures.tests/mcp_http_integration.rsover real HTTP: no-auth → 401, wrong token → 401, correct token → 2xx +serverInfo; gating (no token) → 404 (route absent); anonymous mode → 2xx without auth.mcp dag mcp-http,mcp dag, and default — all compile.Notes / scope
--mcp-http-allow-anonymousenables an (open, test-only) claude.ai connection.